#include <iostream>
#include <string>
#include <queue>
using namespace std;

int main()
{
	queue<int> q;
	int n; cin >> n;
    for (int i = 0; i < n; i++) {
        queue<int> tmp;
        int cur = 1;
        cout << cur;

        for (int j = 1; j < i; j++) {
            int next = q.front(); q.pop();
            tmp.push(cur + next);
            cout << ' ' << cur + next;
            cur = next;
        }

        if (i > 0) {
            tmp.push(1);
            cout << ' ' << 1;
        }

        cout << endl;
        q = tmp;
        q.push(1);
    }
	return 0;
}